// 全局路由切换loading
import * as Acts from './consts';

const RouteModule = {
	state: {
		isLoading: false
	},
	mutations: {
		[Acts.TOGGLE_LOADING](state, toggleState) {
			state.isLoading = toggleState;
		}
	},
	actions: {
		[Acts.TOGGLE_LOADING](store, state) {
			store.commit(Acts.TOGGLE_LOADING, state);
		}
	}
}

export default RouteModule;